package www.lagou.entity;
import www.lagou.utils.DateUtils;

import java.util.Date;

/**
 * phone表
 *    `id` int(11) NOT NULL AUTO_INCREMENT,
 *   `pname` varchar(20) DEFAULT NULL,
 *   `price` double DEFAULT NULL,
 *   `prodate` date DEFAULT NULL,
 *   `color` varchar(20) DEFAULT NULL
 */
public class Phone {
    int id;
    //手机名
    String pname;
    //手机单价
    double price;
    //生成日期
    Date date;
    //手机颜色
    String color;

    public Phone() {
    }

    public Phone(int id, String pname, double price, Date date, String color) {
        this.id = id;
        this.pname = pname;
        this.price = price;
        this.date = date;
        this.color = color;
    }

    public int getId() {
        return id;
    }

    public String getPname() {
        return pname;
    }

    public double getPrice() {
        return price;
    }

    public Date getDate() {
        return date;
    }

    public String getColor() {
        return color;
    }

    public void setId(int id) {
        this.id = id;
    }

    public void setPname(String pname) {
        this.pname = pname;
    }

    public void setPrice(double price) {
        this.price = price;
    }

    public void setDate(Date date) {
        this.date = date;
    }

    public void setColor(String color) {
        this.color = color;
    }

    @Override
    public String toString() {
        return "Phone{" +
                "id=" + id +
                ", pname='" + pname + '\'' +
                ", price=" + price +
                ", date='" + date + '\'' +
                ", color='" + color + '\'' +
                '}';
    }
}
